package cn.bugstack.springframework.beans.factory.config;

import cn.bugstack.springframework.beans.BeansException;
import cn.bugstack.springframework.beans.factory.BeanFactory;

/**
 * @author ouyangzhao
 */
public interface AutowireCapableBeanFactory extends BeanFactory {
    /**
     * 为BeanPostProcessor实现 PostProcessorsBeforeInitialization 就是生成bean的时候进行前置增加的方法
     * @param existingBean
     * @param beanName
     * @return
     */
    Object applyBeanPostProcessorsBeforeInitialization(Object existingBean,String beanName) throws BeansException;


    /**
     * 为BeanPostProcessor 实现ProcessorsAfterInitialization 就是生成bean之后对bean进行一些后置增强的处理
     * @param existingBean
     * @param beanName
     * @return
     * @throws BeansException
     */
    Object applyBeanPostProcessorsAfterInitialization(Object existingBean,String beanName) throws BeansException;

}
